package com.example.decorator.pancake;

public class PancakeTest {

    public static void main(String[] args) {
        Pancake pancake = new BasePancake();
        System.out.println(pancake.getName() + " 总价：" + pancake.getPrice());

        PancakeAddEgg egg = new PancakeAddEgg(pancake);
        System.out.println(egg.getName() + " 总价：" + egg.getPrice());

        PancakeAddSausage sausage = new PancakeAddSausage(egg);
        System.out.println(sausage.getName() + " 总价：" + sausage.getPrice());

        egg = new PancakeAddEgg(egg);
        System.out.println(egg.getName() + " 总价：" + egg.getPrice());

    }
}
